package zhu.yu.demo1;

public class Demo2MethodOverloadSame {
    public static void main(String[] args) {
        byte a = 1;
        byte b = 2;
        System.out.println(isSame(a, b)); // false
        System.out.println(isSame((short) a,(short) b));  // false
        System.out.println(isSame(1L, 1L));  // true
        System.out.println(isSame(1,1L));  // true   == 整数类型判断就是判断数值，是不分int、long、byte、short
        System.out.println(isSame(1,'1'));  // false
    }
    public static boolean isSame(byte a, byte b) {
        return a==b;
    }
    public static boolean isSame(short a, short b) {
        return a==b;
    }
    public static boolean isSame(long a, long b) {
        return a==b;
    }
    public static boolean isSame(int a, long b) {
        return a==b;
    }
    public static boolean isSame(int a, char b) {
        return a==b;
    }
}
